home *** CD-ROM | disk | FTP | other *** search
-
- #define EXTERN extern
- #include "INIPGMS.h"
-
- int DirList2DlgBox( hWndDlg, ID_List )
- HWND hWndDlg ;
- USHORT ID_List ;
- {
- CHAR buffer[80] ;
- FILEFINDBUF findbuf ;
- HDIR hDir = 1 ;
- USHORT usSearchCount = 1 ;
-
- WinSendDlgItemMsg (hWndDlg, ID_List, LM_DELETEALL, NULL, NULL) ;
- if( DosFindFirst ("*.*", &hDir, 0x0017, &findbuf, sizeof findbuf, &usSearchCount, 0L) )
- return( -1 );
- while(usSearchCount)
- {
- if( findbuf.attrFile & 0x0010 && (findbuf.achName[0] != '.' || findbuf.achName[1]) )
- {
- sprintf(buffer,"[%s]",findbuf.achName);
- WinSendDlgItemMsg(hWndDlg, ID_List, LM_INSERTITEM,
- MPFROM2SHORT (LIT_SORTASCENDING, 0),
- MPFROMP (buffer)) ;
- }
- DosFindNext (hDir, &findbuf, sizeof findbuf, &usSearchCount) ;
- }
- DosFindClose( hDir ) ;
- return( 0 ) ;
- } /* End of DirList2DlgBox */
-